@extends('Layout/main')
@section('content')
    @include('layout.message')
    <div class="col-sm-8 blog-main">
        <div>
            <div id="carousel-example" class="carousel slide" data-ride="carousel">
                <!-- Indicators -->
                <ol class="carousel-indicators">
                    <li data-target="#carousel-example" data-slide-to="0" class="active"></li>
                    <li data-target="#carousel-example" data-slide-to="1"></li>
                </ol><!-- Wrapper for slides -->
                <div class="carousel-inner">
                    <div class="item active">
                        <img src="http://pic41.nipic.com/20140508/18609517_112216473140_2.jpg" alt="..."/>
                        <div class="carousel-caption">...</div>
                    </div>
                    <div class="item">
                        <img src="http://pic33.nipic.com/20131007/13639685_123501617185_2.jpg" alt="..."/>
                        <div class="carousel-caption">...</div>
                    </div>
                </div>
                <!-- Controls -->
                <a class="left carousel-control" href="#carousel-example" data-slide="prev">
                    <span class="glyphicon glyphicon-chevron-left"></span></a>
                <a class="right carousel-control" href="#carousel-example" data-slide="next">
                    <span class="glyphicon glyphicon-chevron-right"></span></a>
            </div>
        </div>
        <div style="height: 20px;">
        </div>
        <div>
            @foreach($info as $v)
                <div class="blog-post">
                    <h2 class="blog-post-title"><a href="/article/{{$v->id}}">{{$v->title}}</a></h2>
                    <p class="blog-post-meta">{{$v->created_at->toDayDateTimeString()}} by <a
                                href="/user/{{$v->user_id}}">{{$v->user->name}}</a></p>
                    <p>
                        <img src="{{$v->thumb_img}}">
                    {!! $v->intro !!}
                    <p class="blog-post-meta">赞 0 | 评论 0</p>
                </div>
            @endforeach
            <ul class="pagination">
                {{$info->links()}}
            </ul>

        </div><!-- /.blog-main -->
    </div>
@endsection

@section('my_js')
    <script>
        setTimeout("$('.alert-success').hide()", 3000);
    </script>
@endsection